package cn.edu.scau.cmi.xuxingao.singleton;

public class Chairman {
	private static Chairman chairman;
	private String name;
	private static boolean instanced = false;
	private Chairman(String name) {
		this.name = name;
	}
	
	public static Chairman getInstance(String name) {
		if (chairman == null) {
			chairman = new Chairman(name);
			instanced = true;
			return chairman;
		}
		else {
			return chairman;
		}
	}
	
	public static boolean check() {
		if(instanced == false) 
			return true;
		else return false;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
}
